
[n,~]=size(invW);
R=5;
i=1:n;
x = R*cos(i/n*2*pi);
y = R*sin(i/n*2*pi);
xy = [x' y'];

h=clf;

adj = zeros(size(invW));
adj(abs(invW) > 1e-3) = 1;
gplot(adj, xy, 'b-'); hold on

%adj = zeros(size(invW));
%adj(invW < -1e-2) = 1;
%gplot(adj, xy, 'b-'); hold on

for i=1:n
    text(x(i), y(i), D.wordlist{i}, 'color', 'r', 'fontsize', 5, ...
         'horizontalalignment', 'center');
end
axis equal
xlim([-6 6])
ylim([-6 6]);
%neg = zeros(size(adj)); neg(adj < 0) = 1;
%gplot(neg, xy, 'b-');

print(h, '-depsc', 'word_relation.eps');